<?php

namespace app\pc\controller;
use app\base\controller\Base;
use think\Request;
use think\Cache;
use think\Config;
use think\Session;



class Information extends Base
{
    public  $model;

    public function __construct()
    {
   $this->model = model("Information");
        parent::__construct();

    }

    /**
     * @return \think\response\Json  询价历史
     */
    public function index()
    {//
        //搜索条件 时间 用户号码
        $where = [];

        //时间的处理

     $res = $this->model->Information_page($where);

     return   resJson(1,$this->ecLang("query"),$res['res'],$res['pageInfo']);
    }

    public function read($id){
            $res = $this->model->getOne($id);
            //where("id",$id)->find()

            if($res){
                $res['content'] =stripslashes(htmlspecialchars_decode($res['content']));

                return sucessJson("查询成",$res);
            }
            return failJson("查询失败");

    }



}
